fix: stuck GNSS control logic on intermittent data#27416
Open
bresch wants to merge 2 commits into
Open
Conversation
This fixes the case where the gnss checks is reporting false but the failure doesn't make the control logic time out.
Contributor
❌ PR title needs conventional commit formatExpected format: Your title:
Suggested fix:
To fix this: click the ✏️ next to the PR title at the top of this page and update it. See CONTRIBUTING.md for details. This comment will be automatically removed once the issue is resolved. |
Contributor
💡 Commit messages could be improvedNot blocking, but these commit messages could use some cleanup.
See the commit message convention for details. This comment will be automatically removed once the issues are resolved. |
haumarco
approved these changes
May 21, 2026
Contributor
haumarco
left a comment
There was a problem hiding this comment.
can you use the type(scope): description format for the commits to make CI happy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Solved Problem
I found a race condition where the GNSS checks initially passed and then started to fail intermittently while the drone was on the ground (no relaxed checks). This caused the
GnssChecks::runfunction to always return false, which prevents the samples to be fused, but the GNSS fusion never gets disabled as_time_last_pass_usis still updated by the intermittent good samples.This logic is supposed to stop the GNSS fusion when quality is degraded.
Solution
Only update
_time_last_pass_uswhen the full check really passes (includes the hysteresis).Test coverage
add unit test to re-create the race condition (fails without the fix)